package com.yuyou.train.user.api;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.yuyou.train.service.api.user.entity.UserHw;
import com.yuyou.train.service.api.user.entity.UserHwTeacher;
import com.yuyou.train.service.api.user.service.UserHwAPI;
import com.yuyou.train.user.service.IUserHwService;
import com.yuyou.train.user.service.IUserHwTeacherService;





@RestController
public class UserHwAPIImpl implements UserHwAPI{

	@Autowired
	private IUserHwService userHwService;
	
	@Autowired
	private IUserHwTeacherService userHwTeacherService;

	@Override
	public List<UserHw> findUserHw(@RequestBody UserHw userHw) {
		return userHwService.findUserHw(userHw);
	}

	@Override
	public List<UserHwTeacher> findUserHwTeacher(@RequestBody UserHwTeacher userHwTeacher) {	
		return userHwTeacherService.findByHw(userHwTeacher.getUserHwId(), userHwTeacher.getStatus());
	}
	


}
